/*
 * @Descripttion:
 * @version:
 * @Author: ChenXiang
 * @Date: 2021-05-25 13:48:55
 * @LastEditors: ChenXiang
 * @LastEditTime: 2021-09-03 14:10:33
 */
// These two containers are siblings in the DOM
import React, { useEffect, useRef } from "react";
import Mask from "./useMask";

export default class Parent extends React.Component<any, any> {
  constructor(props) {
    super(props);
    this.state = { value: '' };

  }


  componentWillUnmount() {
    console.log("this.el1111111111");
  }

  convertName = (val) => {
    if (!val) return val;


  }

  render() {
    return (
      <div >
        <input type="text" value={this.state.value} onChange={(e) => {
          const val = e.target.value;
          if (val === '' || /^([1-9][0-9]{0,1}|100)$/.test(val)) {
            this.setState({
              value: val
            })
          }
        }} />

      </div>
    );
  }
}


